package com.iiifi.kite.xss.propertis;

import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotEmpty;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

import lombok.Getter;
import lombok.Setter;

/**
 * Xss配置类
 *
 * @author kite@iiifi.com 花朝
 */
@Getter
@Setter
@Validated
@ConfigurationProperties("kite.xss")
public class KiteXssProperties {

    /**
     * 开启xss
     */
    private boolean enabled = true;
    /**
     * 拦截的路由，默认为空
     */
    @NotEmpty
    private List<String> pathPatterns = new ArrayList<>();
    /**
     * 放行的规则，默认为空
     */
    private List<String> excludePatterns = new ArrayList<>();

}
